#include <iostream>

using std::cout;
using std::endl;


class B
{
public:
    void func();

private:
    class A
    {

    private:
        int _a;
        //外部类的成员函数设置为嵌套类的友元
        friend void B::func();
    };

public:

};

void B::func()
{
    A a;
    cout << a._a <<endl;
}

int main()
{

    return 0;
}

